import request from '@/utils/request'

export const importDaily95598 = data => {
    return request({
        url: '/daily/importDaily95598',
        params: data
    })
}
//停电事件
export const getoutageList = data => {
    return request({
        url: '/power/outage/getList',
        method: 'post',
        data
    })
}
//
export const getoutageimportOutage = data => {
    return request({
        url: '/power/outage/importOutage',
        method: 'post',
        data
    })
}
//生成摘要按钮
export const updateSummary = data => {
    return request({
        url: '/baiLianDemo/dayRequest',
        method: 'post',
        data
    })
}

//诉求标签生成按钮
export const updateWorkTag = data => {
    return request({
        url: '/baiLianDemo/updateWorkTag',
        method: 'post',
        data
    })
}

export const getAll = data => {
    return request({
        url: '/daily/getAll',
        method: 'post',
        data
    })
}
//管控日报
export const getGkDatawx = data => {
    return request({
        url: '/wx/control/report/daily/detail',
        method: 'get',
        params: data
    })
}
//管控日报
export const getGkData = data => {
    return request({
        url: '/control/report/daily/detail',
        method: 'get',
        params: data
    })
}
// 业扩日报
export const getYkData = data => {
    return request({
        url: '/yeKuo/dailyWorkOrderSummary',
        method: 'get',
        params: data
    })
}
export const getLastDatTime = () => {
    return request({
        url: '/daily/getLastDatTime'
    })
}
//投诉明细 /complaint/detail/daily/data
export const getComp = data => {
    return request({
        url: '/complaint/detail/daily/data',
        method: 'get',
        params: data
    })
}
//投诉明细跳过身份验证 wx/complaint/detail/daily/data
export const getComplaintData = data => {
    return request({
        url: 'wx/complaint/detail/daily/data',
        method: 'get',
        params: data
    })
}
//时段时报 wx/periodic/report/daily/detail

export const getPeriodicData = data => {
    return request({
        url: 'wx/periodic/report/daily/detail',
        method: 'get',
        params: data
    })
}
//时段时报 /periodic/report/daily/detail
export const getPeriodic = data => {
    return request({
        url: '/periodic/report/daily/detail',
        method: 'get',
        params: data
    })
}
//临期业扩基础数据导入接口
export const importBusinessExpansion = data => {
    return request({
        url: 'import/importBusinessExpansion',
        method: 'post',
        params: data
    })
}
//高压超期业扩基础数据导入接口
export const importHighVoltageOverdueBusinessExpansion = data => {
    return request({
        url: '/import/importHighVoltageOverdueBusinessExpansion',
        method: 'post',
        params: data
    })
}
//低压超期业扩基础数据导入接口
export const importLowVoltageOverdueBusinessExpansion = data => {
    return request({
        url: '/import/importLowVoltageOverdueBusinessExpansion',
        method: 'post',
        params: data
    })
}
//故障单基础数据导入接口import/importFaultTicket
export const importFaultTicket = data => {
    return request({
        url: '/import/importFaultTicket',
        method: 'post',
        params: data
    })
}
//前端页面：数据导入->客服工单，页面增加两个按钮，一个按钮选择年份删除，另外一个按钮删除所有
// 1、按年份删除数据接口：
// /workOrder/deleteByDate或wx/workOrder/deleteByDate(跳过身份验证)
// 请求方式：GET
// 请求参数：year（格式:yyyy）
//时段时报 /periodic/report/daily/detail
export const deleteByDate = data => {
    return request({
        url: 'workOrder/deleteByDate',
        method: 'get',
        params: data
    })
}
export const deleteByDatewx = data => {
    return request({
        url: 'wx/workOrder/deleteByDate',
        method: 'get',
        params: data
    })
}
// 2、删除所有：
// /workOrder/deleteAll或wx/workOrder/deleteAll(同上)
// 请求方式：GET
export const deleteAllwx = data => {
    return request({
        url: 'wx/workOrder/deleteAll',
        method: 'get',
        params: data
    })
}
export const deleteAll = data => {
    return request({
        url: '/workOrder/deleteAll',
        method: 'get',
        params: data
    })
}

// 报障单基础数据导入接口import/importReportTicket 
export const importReportTicket = (data) => {
    return request({
        url: 'import/importReportTicket',
        method: 'post',
        data
    })
}
//后续工单基础数据导入接口import/importSubWorkerOrders
export const importSubWorkerOrders = (data) => {
    return request({
        url: 'import/importSubWorkerOrders',
        method: 'post',
        data
    })
}
//业扩数据接口 yeKuo/calc/by/ruleNum
export const getruleNum = (data,val) => {
    return request({
        url: `yeKuo/calc/by/ruleNum?ruleNum=${val}`,
        method: 'post',
        data
    })
}

// /businessExpansion/getList 获取临期业扩基础数据列表接口
export const getListbusinessExpansion = (data) => {
    return request({
        url: 'businessExpansion/getList',
        method: 'post',
        data
    })
}
// /highVoltageOverdueBusinessExpansion/getList   高压业扩
export const getListhighVoltage = (data) => {
    return request({
        url: 'highVoltageOverdueBusinessExpansion/getList',
        method: 'post',
        data
    })
}
// /lowVoltageOverdueBusinessExpansion/getList   低压业扩
export const getListlowVoltage = (data) => {
    return request({
        url: 'lowVoltageOverdueBusinessExpansion/getList',
        method: 'post',
        data
    })
}
// 后续工单查询/SubWorkerOrders/getList
export const getListSubWorkerOrders = (data) => {
    return request({
        url: 'SubWorkerOrders/getList',
        method: 'post',
        data
    })
}
// 报障单查询/reportTicket/getList
export const getListreportTicket = (data) => {
    return request({
        url: 'reportTicket/getList',
        method: 'post',
        data
    })
}
// 故障单查询/faultTicket/getList
export const getListfaultTicket = (data) => {
    return request({
        url: 'faultTicket/getList',
        method: 'post',
        data
    })
}
// 一、导入excel数据
// 接口：/import/faultReportForm
// 参数：files


// 二、查询报账单
// 接口：/fault/form/getList
export const getfaultlist = (data) => {
    return request({
        url: '/fault/form/getList',
        method: 'post',
        data
    })
}
//用户标签查询 /req/tag/list
export const gettaglist = (data) => {
    return request({
        url: '/req/tag/list',
        method: 'post',
        data
    })
}
//删除/complaint/base/deleteAll
export const getdeleteAll= (data) => {
    return request({
        url: '/complaint/base/deleteAll',
        method: 'get',
        params: data
    })
}

//新增/req/tag/save
export const getaddsavelist = (data) => {
    return request({
        url: '/req/tag/save',
        method: 'post',
        data
    })
}
//删除
export const getdeletelist = (data) => {
    return request({
        url: '/req/tag/delete',
        method: 'delete',
        data
    })
}
//编辑
export const getupdatelist = (data) => {
    return request({
        url: '/req/tag/update',
        method: 'post',
        data
    })
}
//诉求标签日志弹框 /req/log/list
export const getlogsist = (data) => {
    return request({
        url: '/req/log/list',
        method: 'post',
        data
    })
}
//地市查询 /prefecture/city/daily/report
export const getdailyreport = (data) => {
    return request({
        url: '/prefecture/city/daily/report',
        method: 'get',
        params: data
        
    })
}
//每日要情 /complaint/daily/highlights
export const getdailyhighlights = (data) => {
    return request({
        url: '/complaint/daily/highlights',
        method: 'get',
        params: data
        
    })
}
//import/customer/process
// 导入定制客服工单表
// import/order/notsigned
// 15分钟签收超时督办excel
export const createDailyData = () => {
    return request({
        url: '/daily/createDailyData'
    })
}
//超时明细 查询/daily/timeout/detail/getData
export const getDataovertime = (data) => {
    return request({
        url: '/daily/timeout/detail/getData',
        method: 'post',
        data
    })
}
//超时明细 删除所有/daily/timeout/detail/deleteAll
export const getovertimedeleteAll = data => {
    return request({
        url: '/daily/timeout/detail/deleteAll',
        method: 'get',
        params: data
    })
}
//12398导出/complaint/12398/detail/status/export
export const getDaily12398export = (data) => {
    return request({
        url: '/complaint/12398/detail/status/export',
        method: 'get',
        params: data,
        responseType: 'blob',
    })
}
//95598导出 /complaint/95598/detail/status/export
export const getDaily95598export = (data) => {
    return request({
        url: '/complaint/95598/detail/status/export',
        method: 'get',
        params: data,
        responseType: 'blob',
    })
}
//后续跟踪地市环节工单查询
export const subWorkerProcessgetList = (data) => {
    return request({
        url: '/subWorkerProcess/getList',
        method: 'post',
        data
    })
}
//后续跟踪地市环节工单删除
export const subWorkerProcessdeleteByDate = data => {
    return request({
        url: '/subWorkerProcess/deleteByDate',
        method: 'get',
        params: data
    })
}
export const getDaily95598Data = (data) => {
    return request({
        url: '/daily/getDaily95598Data',
        method: 'post',
        data
    })
}

export const complaint = (data) => {
    return request({
        url: '/import/complaint',
        method: 'post',
        data
    })
}

export const getComplaint = (data) => {
    return request({
        url: '/daily/getComplaint',
        method: 'post',
        data
    })
}

export const getDeleteTag = (data) => {
    return request({
        url: '/daily/getDeleteTag',
        method: 'post',
        data
    })
}

export const complaint12398Statistics = (data) => {
    return request({
        url: '/complaint/12398/statistics',
        method: 'post',
        params: data
    })
}

export const create95598Data = (data) => {
    return request({
        url: '/complaint/95598/create95598Data',
        method: 'post',
        params: data
    })
}

export const getDaily12398Data = (data) => {
    return request({
        url: '/complaint/12398/getDaily12398Data',
        method: 'post',
        data
    })
}

export const export12398Data = (data) => {
    return request({
        url: '/complaint/12398/detail/export',
        method: 'get',
        params: data,
        responseType: 'blob'
    })
}

export const getDataByTime = (data) => {
    return request({
        url: '/complaint/12398/getDataByTime',
        method: 'post',
        params: data
    })
}

export const getData95598ByTime = (data) => {
    return request({
        url: '/complaint/95598/getDataByTime',
        method: 'post',
        params: data
    })
}
